package com.woniuxy.rpims.action;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;
import com.woniuxy.rpims.entity.InhabitantReweard;
import com.woniuxy.rpims.service.InhabitantReweardService;
import com.woniuxy.rpims.util.PageInfo;

@Controller("inhabitantReweardAction")
@Scope("prototype")
public class InhabitantReweardAction {
       
	  @Resource
      private InhabitantReweardService inhabitantReweardService;

      private InhabitantReweard inhabitantReweard;


	public InhabitantReweard getInhabitantReweard() {
		return inhabitantReweard;
	}

	public void setInhabitantReweard(InhabitantReweard inhabitantReweard) {
		this.inhabitantReweard = inhabitantReweard;
	}
      
    public String find(){
    	PageInfo pageInfo = inhabitantReweardService.find(inhabitantReweard);  
    	if(pageInfo!=null){
        	Map session = ActionContext.getContext().getSession();
        	session.put("pageInfo", pageInfo);
        	return "success";
        }else{
    		return "error";
    	}
    	
    }
}
